You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Root cause:conflicts_with = "data-dir" panics at runtime because clap resolves argument IDs during parsing and cannot locate data_dir when it lives inside a flattened CommonArgs struct — the ID namespace doesn't cross #[clap(flatten)] boundaries at runtime validation.
Fix: Removed the conflicts_with attribute entirely. The existing code already gives --fetch unconditional priority over --data-dir in run() — when --fetch is provided, data_dir is simply not used. Both flags being specified simultaneously produces correct, unambiguous behavior (fetch wins), so no runtime validation is needed.
If mutual exclusivity error messages are desired in the future, the correct approach would be an explicit anyhow::bail! check at the top of run() comparing self.fetch.is_some() with whether --data-dir was set to a non-default value via ArgMatches.
Root cause:tempfile::TempDir deletes the directory when it's dropped. fetch_suite created a TempDir, copied its path into a PathBuf, then returned the PathBuf — but TempDir went out of scope at the end of the function and deleted the directory before the caller could use it. The suite was being extracted correctly, then immediately deleted.
Fix: Replace tempdir() → .path().to_path_buf() with tempdir() → .keep(). TempDir::keep() converts the handle into a plain PathBuf without registering a destructor, so the directory persists for the lifetime of the process (the OS cleans it up on exit, which is appropriate for a CLI tool).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--fetch <url>flag torunsubcommand that downloads a.tar.zstbenchmark suite, extracts it to a--data-dir(conflicts_with enforced by clap)Closes #14
Test Plan
cargo test -p bento-bench— 3/3 passcargo clippy -p bento-bench -- -D warnings— zero warningsbento-bench run --fetch <real-url> --iterations 1